//
//  HKYException.swift
//  HKYHttpRequest
//
//  Created by SHANGLU on 16/12/14.
//  Copyright © 2016年 hky.me. All rights reserved.
//

import UIKit

class HKYException: NSObject {
    
    enum  HttpError:ErrorType,CustomStringConvertible {
        case Error404
        case ErrorOther(Int,String)
        case Response200
        var description: String{
            switch self {
            case .ErrorOther(let code,let msg):
                return "【其它类型的错误信息:\n\(code)\n" + msg + "】"
            case .Error404:
                return "【错误信息:\n\(404)" + "】"
            case . Response200:
                return "【请求成功】"
            }
            
        }
    
    }
    
    
}
